package com.share.pojo.input;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 角色保存入参
 *
 * @author liw
 * @version 1.0
 * @date 2022/6/30 11:15
 */
@Data
public class AddressSaveInput extends BaseInput implements Serializable {

    private static final long serialVersionUID = -1L;

//    @Pattern(regexp = "^[一-龥a-zA-Z0-9]+$", message = "名称请输入数字字母和汉字")
    @NotNull(message = "名称不能为空")
    private String name;

//    @Pattern(regexp = "^[一-龥_#\\-a-zA-Z0-9]+$", message = "地址详情请输入数字字母和汉字")
    @NotNull(message = "地址详情不能为空")
    private String detail;

//    @Pattern(regexp = "^[0-9]+$", message = "电话请输入数字")
    @NotNull(message = "电话不能为空")
    private String phone;

    /**
     * The city code.
     */
    @Pattern(regexp = "^[0-9]{6}$")
    @NotNull
    private String cityCode1;

    /**
     * The city code.
     */
    @Pattern(regexp = "^[0-9]{6}$")
    @NotNull
    private String cityCode2;

    /**
     * The city code.
     */
    @Pattern(regexp = "^[0-9]{6}$")
    @NotNull
    private String cityCode3;

    /**
     * The city name.
     */
    @Pattern(regexp = "^[一-龥_a-zA-Z0-9]+$")
    @NotNull
    private String cityName1;

    /**
     * The city name.
     */
    @Pattern(regexp = "^[一-龥_a-zA-Z0-9]+$")
    @NotNull
    private String cityName2;

    /**
     * The city name.
     */
    @Pattern(regexp = "^[一-龥_a-zA-Z0-9]+$")
    @NotNull
    private String cityName3;

}
